RequireSystemScript("screen.js");

function Teleport(x,y,map, layer)
{
	// Fade out from the current map
	FadeOut(1000);
	ChangeMap(map);
	SetPersonLayer("dude", layer);
	SetPersonX("dude", x*16);
	SetPersonY("dude", y*16);
	// Everything set, render it for the fade in effect
	RenderMap();
	FadeIn(1000);
}
